#include"stuck.h"
#include <iostream>
#include <assert.h>

void stack::init(int n)
{
	_a = (int*)malloc(sizeof(int) * n);
	if (_a == nullptr)
	{
		perror("malloc");
		return;
	}
	_capacity = n;
	_top = 0;

}